package star.cloud.asme.base.file.cosClient;

import com.qcloud.cos.model.UploadResult;
import com.qcloud.cos.transfer.MultipleFileUpload;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/cosClient")
@RequiredArgsConstructor
public class CosClientController {
    private final CosClientService cosClientService;

    @GetMapping("/uploadLocalFile")
    public UploadResult uploadLocalFile() {
        return cosClientService.uploadLocalFile();
    }

    @GetMapping("/uploadDirectory")
    public MultipleFileUpload uploadDirectory() {
        return cosClientService.uploadDirectory();
    }

}